<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.prime.com.tr/ui"> 
    <h:head> 
        <title>Add New Event</title> 

        <style type="text/css"> 

            .gritter-notice-wrapper { 
                left:200px; 
                top: 50px; 
            } 

        </style> 

    </h:head> 
    <h:body>                 

        <h:form id="formMain"> 

            <h1>MyPrimeFacesOrganizer - Powered by PrimeFaces 2.2.1</h1>

            <p:menubar autoSubmenuDisplay="true">                 
                <p:menuitem value="Home" url="index.xhtml" /> 
                <p:menuitem value="View All Events" url="viewAllEvents.xhtml" /> 
                <p:menuitem value="Add New Event" url="addNewEvent.xhtml" /> 
            </p:menubar> 

            <br/> 

            <p:panel id="panel" header="Add New Event"> 
                <p:ajaxStatus style="width:16px;height:16px;">   
                    <f:facet name="start">   
                        <h:graphicImage 
                            value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif" /> 
                    </f:facet> 

                    <f:facet name="complete">   
                        <h:outputText value="" />   
                    </f:facet>   
                </p:ajaxStatus> 

                <p:messages /> 

                <h:panelGrid columns="3" cellpadding="10"> 

                    <h:outputLabel for="eventName" style="font-weight: bold" 
                                   value="Event Name: " /> 
                    <h:inputText required="true" label="Event Name" 
                                 requiredMessage="Event Name is required." id="eventName" 
                                 value="#{eventManagerBean.eventName}"> 
                        <f:validateLength minimum="4" maximum="16" /> 
                    </h:inputText> 
                    <p:message for="eventName" /> 

                    <h:outputLabel for="startDateTime" style="font-weight: 
                                   bold" value="Start Date/Time: " /> 
                    <h:inputText required="true" label="Start Date/Time" 
                                 requiredMessage="Start Date/Time is required." id="startDateTime" 
                                 value="#{eventManagerBean.startDateTime}"> 
                        <f:validateLength minimum="19" maximum="19" /> 
                    </h:inputText> 
                    <p:message for="startDateTime" /> 

                    <h:outputLabel for="endDateTime" style="font-weight: 
                                   bold" value="End Date/Time: " /> 
                    <h:inputText required="true" label="End Date/Time" 
                                 requiredMessage="End Date/Time is required." id="endDateTime" 
                                 value="#{eventManagerBean.endDateTime}"> 
                        <f:validateLength minimum="19" maximum="19" /> 
                    </h:inputText> 
                    <p:message for="endDateTime" /> 

                    <h:outputLabel for="venue" style="font-weight: bold" 
                                   value="Venue: " /> 
                    <h:inputText required="true" label="Venue" 
                                 requiredMessage="Venue is required." id="venue" 
                                 value="#{eventManagerBean.venue}"> 
                        <f:validateLength minimum="1" maximum="4" /> 
                    </h:inputText>
                    <p:message for="venue" /> 

                    <h:outputLabel for="systemUser" style="font-weight: bold" 
                                   value="System User: " /> 
                    <h:inputText required="true" label="System User" 
                                 requiredMessage="System User is required." id="systemUser" 
                                 value="#{eventManagerBean.systemUser}"> 
                        <f:validateLength minimum="1" maximum="4" /> 
                    </h:inputText> 
                    <p:message for="systemUser" /> 

                </h:panelGrid> 

                <p:commandButton id="btn" value="Save New Event" 
                                 update="panel" actionListener="#{eventManagerBean.saveNewEvent}" ajax="true" 
                                 /> 

            </p:panel> 

        </h:form> 

    </h:body> 
</html> 